package pojo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class User {
    private Integer user_id;
    private String user_name;
    private String telephone;
    private String password;
    private String real_name;
    private String user_role;

    // 格式化 last_login 字段，输出为 "yyyy-MM-dd HH:mm:ss" 格式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date last_login;

    private Integer login_count;

    // 格式化 create_time 字段，输出为 "yyyy-MM-dd HH:mm:ss" 格式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date create_time;

    // Getter和Setter方法
    public Integer getUserId() { return user_id; }
    public void setUserId(Integer user_id) { this.user_id = user_id; }

    public String getUserName() { return user_name; }
    public void setUserName(String user_name) { this.user_name = user_name; }

    public String getTelephone() { return telephone; }
    public void setTelephone(String telephone) { this.telephone = telephone; }

    public String getPassword() { return password; }
    public void setPassword(String password) { this.password = password; }

    public String getRealName() { return real_name; }
    public void setRealName(String real_name) { this.real_name = real_name; }

    public String getUserRole() { return user_role; }
    public void setUserRole(String user_role) { this.user_role = user_role; }

    public Date getLastLogin() { return last_login; }
    public void setLastLogin(Date last_login) { this.last_login = last_login; }

    public Integer getLoginCount() { return login_count; }
    public void setLoginCount(Integer login_count) { this.login_count = login_count; }

    public Date getCreateTime() { return create_time; }
    public void setCreateTime(Date create_time) { this.create_time = create_time; }
}